Add 'deficon' to garmin modes.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 21 Oct 2004 17:24:01 +0000 (17:24 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 21 Oct 2004 17:24:01 +0000 (17:24 +0000)
gpsbabel/Makefile
gpsbabel/garmin.c

index 35ac1039a147f9ce416cd1328e0d33602bf02285..2e235b5ca6efdc36115f3cff4dced762a60ca41a 100644 (file)
@@ -88,10 +88,10 @@ dep:
        (echo -n "internal_styles.c: mkstyle.sh " ; echo style/*.style ; /bin/echo -e '\t./mkstyle.sh > internal_styles.c || (rm -f internal_styles.c ; exit 1)' ) >> /tmp/dep
        echo Edit Makefile and bring in /tmp/dep
 
-#VERSIONU=1_2_4_beta10162004
-#VERSIOND=1.2.4_beta10162004
-VERSIONU=1_2_4
-VERSIOND=1.2.4
+VERSIONU=1_2_5_beta10212004
+VERSIOND=1.2.5_beta10212004
+#VERSIONU=1_2_4
+#VERSIOND=1.2.4
 
 release:
        cvs commit
index 898fc59ac8b95fe9b0c062498bd4ce4ea77b8643..57b729c7afb56edec7def7efc861d2b0147c5dcc 100644 (file)
@@ -36,6 +36,7 @@ static char *getposn = NULL;
 static char *poweroff = NULL;
 static char *snlen = NULL;
 static char *snwhiteopt = NULL;
+static char *deficon = NULL;
 
 static
 arglist_t garmin_args[] = {
@@ -43,6 +44,7 @@ arglist_t garmin_args[] = {
                ARGTYPE_INT },
        { "snwhite", &snwhiteopt, "(0/1) Allow whitespace synth. shortnames",
                NULL, ARGTYPE_BOOL},
+       { "deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING },
        { "get_posn", &getposn, "Return current position as a waypoint", 
                NULL, ARGTYPE_BOOL},
        { "power_off", &poweroff, "Command unit to power itself down", 
@@ -452,10 +454,14 @@ waypoint_write(void)
                way[i]->lon = wpt->longitude;
                way[i]->lat = wpt->latitude;
 
-               if (get_cache_icon(wpt)) {
-                       icon = mps_find_icon_number_from_desc(get_cache_icon(wpt), PCX);
+               if (deficon) {
+                       icon = mps_find_icon_number_from_desc(deficon, PCX);
                } else {
-                       icon = mps_find_icon_number_from_desc(wpt->icon_descr, PCX);
+                       if (get_cache_icon(wpt)) {
+                               icon = mps_find_icon_number_from_desc(get_cache_icon(wpt), PCX);
+                       } else {
+                               icon = mps_find_icon_number_from_desc(wpt->icon_descr, PCX);
+                       }
                }
 
                /* For units that support tiny numbers of waypoints, just